﻿using SqlSugar;

namespace Zhao.Models.Entity
{
    [SugarTable("Menus")]
    public class Menus
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        [SugarColumn(ColumnName = "Id", IsPrimaryKey = true)]
        public Guid Id { get; set; }

        /// <summary>
        /// 父级Id
        /// </summary>
        [SugarColumn(ColumnName = "ParentId")]
        public Guid ParentId { get; set; }

        /// <summary>
        /// 菜单名称
        /// </summary>
        [SugarColumn(ColumnName = "MenuText")]
        public string? MenuText { get; set; }

        /// <summary>
        /// 图标
        /// </summary>
        [SugarColumn(ColumnName = "Icon")]
        public string? Icon { get; set; }

        /// <summary>
        /// 路由名称
        /// </summary>
        [SugarColumn(ColumnName = "WebUrlName")]
        public string? WebUrlName { get; set; }

        /// <summary>
        /// 前端Url地址--路由的地址
        /// </summary>
        [SugarColumn(ColumnName = "WebUrl")]
        public string? WebUrl { get; set; }

        /// <summary>
        /// 保存Vue具体文件的某一个地址
        /// </summary>
        [SugarColumn(ColumnName = "VueFilePath")]
        public string? VueFilePath { get; set; }

        /// <summary>
        /// 是否叶节点
        /// </summary>
        [SugarColumn(ColumnName = "IsLeafNode")]
        public bool IsLeafNode { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        [SugarColumn(ColumnName = "OrderBy")]
        public int OrderBy { get; set; }

        /// <summary>
        /// 递归类型
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public List<Menus>? Children { get; set; }

        [SugarColumn(ColumnName = "CreateTime")]
        public DateTime CreateTime { get; set; }
        [SugarColumn(ColumnName = "UpdateTime")]
        public DateTime UpdateTime { get; set; }
        [SugarColumn(ColumnName = "Status")]
        public int Status { get; set; }
        /// <summary>
        /// 是否删除
        /// </summary>
        [SugarColumn(ColumnName = "IsDeleted")] 
        public bool IsDeleted { get; set; } = false;


    }
}